package com.cln.reverse_string;

import junit.framework.TestCase;

public class StringReverserTest extends TestCase{
	//"a b" - "b a"
	public void testSimpleReverse(){
		assertEquals("b a", new StringReverser("a b").reverse());
		assertEquals("c b a", new StringReverser("a b c").reverse());
	}
	
	public void testReverseWithSingleWords(){
		assertEquals("a", new StringReverser("a").reverse());
	}
	
	public void testReverseWithSplitTokenIn(){
		assertEquals(" ", new StringReverser(" ").reverse());
		assertEquals("    ", new StringReverser("    ").reverse());
		assertEquals("b    a", new StringReverser("a    b").reverse());
		assertEquals("c b a ", new StringReverser(" a b c").reverse());
		assertEquals("c  b a", new StringReverser("a b  c").reverse());
	}

//	public void testNullReverse(){
//		assert(null, new StringReverser(null).reverse());
//	}
		
}
